<div class="box">
	<h2>Cấu hình block</h2>
	<?php 
		$data = $this->data;
	?>
<form method="post" action="" enctype="multipart/form-data"><!-- Form -->
					<fieldset><legend>Thông tin block</legend>
					<div class="input_field">
						<label for="name">Tên block</label>							
 						<?php echo $this->formText("name",$data['name'],array('readonly'=>'readonly')); ?>
					</div>
					<?php
						if(($data['name'] == 'TopMenu')||($data['name'] == 'MainMenu'))
						{
							?>
					<div class="input_field">
							<label for="category">Thể loại menu</label>
	 						<select name="category" onchange="change_parent(<?php echo $this->id;?>,this.options[this.selectedIndex].value);">
	 							<?php 
	 								$modelMenuCat = new Model_MenuCat_MenuCat();
	 								$menucat = $modelMenuCat->getAllIsActive();
	 								$i = 0;
	 								$first_id = '';
	 								foreach ($menucat as $item)
	 								{	
	 								    if($i==0)
	 								        $first_id = $item['id'];
	 								    $i++;
	 							?>					
	 									<option value="<?php echo $item['id'];?>" <?php if($data['category']==$item['id']) echo 'selected="selected"';?> ><?php echo $item['name'];?></option>
	 							<?php  }
	 							?>
	 							
	 						</select>
 					</div>		
					<?php
						}					
					 ?>
					 
					
					<?php
					//For file cat
						if($data['name'] == 'Logo' || $data['name'] == 'BannerTop' || $data['name'] == 'BannerRight' || $data['name'] == 'HomeBannerRight1' || $data['name'] == 'HomeBannerRight2'|| $data['name'] == 'HomeBannerMiddle')
						{
							?>
					<div class="input_field">
							<label for="category">Thể loại file</label>
	 						<select name="category">
	 							<?php 
	 								$modelFileCat = new Model_FileCat_FileCat();
	 								$filecat = $modelFileCat->getAllIsActive();
	 								foreach ($filecat as $item)
	 								{	
	 							?>					
	 									<option value="<?php echo $item['id'];?>" <?php if($data['category']==$item['id']) echo 'selected="selected"';?> ><?php echo $item['name'];?></option>
	 							<?php  }
	 							?>
	 							
	 						</select>
 					</div>		
					<?php
						}					
					 ?>
					</fieldset>
					<input class="submit" type="submit" value="Lưu" />
			</form><!-- /Form -->
</div> <!-- END Box-->